840c37a1e3d4e80723814d5a7c89471e2effc456,plugins/ant/src/com/intellij/lang/ant/psi/impl/reference/providers/AntRefIdReferenceProvider.java,AntRefIdReferenceProvider,getReferencesByElement,#PsiElement#,19
Before Change
AntStructuredElement se = (AntStructuredElement)element;
final XmlAttribute attr = se.getSourceElement().getAttribute("refid", null);
if (attr != null) {
final int offsetInPosition = attr.getValueElement().getTextRange().getStartOffset() - se.getTextRange().getStartOffset() + 1;
final String attrValue = attr.getValue();
return new PsiReference[]{
new AntRefIdReference(this, se, attrValue, new TextRange(offsetInPosition, offsetInPosition + attrValue.length()), attr)};
After Change
if (attr == null) {
return PsiReference.EMPTY_ARRAY;
}
final XmlAttributeValue valueElement = attr.getValueElement();
if (valueElement == null) {
return PsiReference.EMPTY_ARRAY;
}
final int offsetInPosition = valueElement.getTextRange().getStartOffset() - se.getTextRange().getStartOffset() + 1;
final String attrValue = attr.getValue();